package com.example.filter;

import jakarta.servlet.*;
import jakarta.servlet.annotation.WebFilter;
import lombok.extern.slf4j.Slf4j;

import java.io.IOException;

/**
 * @Auther: Sun
 * @Date: 2025/9/23 - 09 - 23 - 15:36
 * @Description: com.example.filter
 */
//@WebFilter(urlPatterns = "/*")
@Slf4j
public class DemoFilter implements Filter {


    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        log.info("拦截到了请求...放行前...");
        //放行
        filterChain.doFilter(servletRequest,servletResponse);
        log.info("拦截到了请求...放行后...");

    }



}

